package com.zhumeijia.wuye.mapper;

import com.zhumeijia.wuye.bean.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {
    int getCountAll();

    List<Goods> getAllGoods(@Param("page") int page, @Param("limit") int limit);

    int addGoods(Goods goods);

    int updateGoods(Goods goods);

    int delGoods(@Param("id") int id);

    int getCountByName(@Param("name") String name);

    List<Goods> findGoods(@Param("page") int page, @Param("limit") int limit, @Param("name") String name);

    List<Goods> getAllGoodss();

    void updateNumberByName(long number, String name);

    List<Goods> findGoodsById(int id);

    List<Goods> getGoodsByName(String gname);

    int getCountByWhid(int whid, String gname);

}
